﻿@{
    Layout = null;
}
@Content.Script(Url, "Manager/DealerLevel.js")
@*<div>经销商等级管理</div>*@
@*<script src="~/Scripts/MGJJS/Manager/DealerLevel.js"></script>*@
<div class="mtlr15">    
    <div class="row">
        <div class="col-lg-8 col-md-8 col-sm-8" style="padding:0">
            <button type="button" class="btn btn-success" onclick="$.MGJ.DealerLevel.Dialog_AEditLevel()">
                <i class="glyphicon glyphicon-plus-sign"></i>
                新建
            </button>
            @*<button type="button" class="btn btn-success" onclick="$.MGJ.DealerLevel.ExportExecl('#DealerLevelTable')">
                <i class="glyphicon glyphicon-arrow-down"></i>
                导出excel
            </button>*@
        </div>

        <div class="col-lg-4 col-md-4 col-sm-4">
            <div class="input-group">
                <input type="text" id="dsearch" class="form-control" placeholder="等级名称" onkeydown="if (event.keyCode == 13) { $.MGJ.DealerLevel.Ajax_DealerLevelList(1); }">
                <span class="input-group-addon" onclick="$.MGJ.DealerLevel.Ajax_DealerLevelList(1);">
                    <span class="glyphicon glyphicon-search"></span>
                </span>
            </div>
        </div>
    </div>
    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th width="30px"><input class="AllClickCheckbox" type="checkbox"></th>
                      
                        <th> 等级</th>
                        <th>等级名称</th>
                        <th>操作时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="DealerLevelTable" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'$.MGJ.DealerLevel.Ajax_DealerLevelList','emptyHtml':DID_EmptyHtml}">
                    <tr>
                        <td width="15"><input type="checkbox" class="AllClickChild" binding="{'ID':'Id'}"></td>
                       
                        <td binding="{'text':'Level'}"></td>
                        <td binding="{'text':'LevelName'}"></td>
                        <td binding="{'text':'ChangeDate','textHandle':'datetime'}"></td>
                        <td>
                            <a binding="{'DID':'Id'}" onclick="$.MGJ.DealerLevel.Dialog_EditLeve(this)">编辑</a>
                            <a binding="{'DID':'Id'}" onclick="$.MGJ.DealerLevel.Ajax_DelLeve(this)">删除</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="ShoppingPager"></div>
    </div>
</div>

<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.DID_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $(function () {
        $.MGJ.DealerLevel.Ajax_DealerLevelList(1);
    });
</script>